

CC=gcc

all:cleant cleanc

serv:serv_gcc
	./server -p 8898

cli:cli_gcc
	./client -t 10 -p 8898 -i 127.0.0.1

serv_gcc:
	${CC} -I/usr/include/cjson/ -I /home/iot22/sqlite-autoconf-3370000/ server.c -o server -lcjson -lsqlite3 -L /home/iot22/sqlite3_build/lib

cli_gcc:
	${CC} -I/usr/include/cjson/ -I /home/iot22/sqlite-autoconf-3370000/ client.c -o client -lcjson -lsqlite3 -L /home/iot22/sqlite3_build/lib

cleant:
	rm -f temper.db

cleanc:
	rm -f client.db

opent:
	/home/iot22/sqlite-autoconf-3370000/sqlite3 /home/iot22/lijiale/ds38b20/temper.db

openc:
	/home/iot22/sqlite-autoconf-3370000/sqlite3 /home/iot22/lijiale/ds38b20/client.db
